﻿using System;
using System.Collections.Generic;
using System.Text;
using Mighty.Brain;
using Mighty.Common;
using System.Windows.Forms;

namespace Mighty.PlayingBoard
{
    class ClientConnector : Connector
    {
        GameInfo gameInfo;
        PlayingBoard playingBoard;
        Network network = new Network();

        String ip;
        int port;

        public ClientConnector(String c_ip, int c_port, int c_position)
            : base(c_position)
        {
           playingBoard = new PlayingBoard();
           ip = c_ip;
           port = c_port;
          
        }

        override public void SetGameInfo(GameInfo g)
        {
            gameInfo = g;
            //playingBoard.SendGameInfoToClient(gameInfo, position);
        }

        override protected Object RequestInvoke()
        {
            Object result = null;


            switch (threadActualStatus)
            {
                case ActualStatus.GameStartEvent:

                    break;
                case ActualStatus.BettingReadyEvent:
                    //MessageBox.Show("BettingReadyEvent");
                    break;
                case ActualStatus.BettingTicEvent:
                    //MessageBox.Show("BettingTicEvent");
                    break;
                case ActualStatus.BettingCompleteEvent:
                    //MessageBox.Show("BettingCompleteEvent");
                    break;
                case ActualStatus.ChoiceCardEvent:
                    
                    break;
                case ActualStatus.ChoiceFriendEvent:
                    
                    break;
                case ActualStatus.LastBettingEvent:
                    
                    break;
                case ActualStatus.RoundReadyEvent:
                    
                    break;
                case ActualStatus.RoundTicEvent:
                    //MessageBox.Show("RoundTicEvent");
                    break;
                case ActualStatus.RoundCompleteEvent:
                    
                    break;
                case ActualStatus.GameEndEvent:
                    
                    break;
            }

            return result;
        }

        public void SetPlayingBoard(PlayingBoard p)
        {
            playingBoard = p;
        }
    }
}
